package com.buba.controller;

import com.buba.service.InformationService;
import entity.Information;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import result.CommonResult;

/**
 * @Author: 孔德嘉
 * @Description: TODO资讯
 * @DateTime: 2023/3/4 14:49
 **/
@RestController
@CrossOrigin
public class InformationController {

    //注入
    @Autowired
    private InformationService informationService;

    /*
    * @param id //用户id
    * @return result.CommonResult
    * @author kdj
    * @describe:获取资讯列表
    * @date 2023/3/4 15:02
    */
    @GetMapping("/getInformationLabel")
    public CommonResult getInformationLabel(int id){
        return CommonResult.ok(informationService.getInformationLabel(id));
    };
}
